package me.xingyannian.zhaopin.service;

import me.xingyannian.zhaopin.entity.QualityUniversity;
import me.xingyannian.zhaopin.repository.QualityUniversityRepository;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * QualityUniversityService
 *
 * @author XING&WANG
 * @version 2025/05/05 16:29
 **/
@Service
public class QualityUniversityService {
    private final QualityUniversityRepository qualityUniversityRepository;

    public QualityUniversityService(QualityUniversityRepository qualityUniversityRepository) {
        this.qualityUniversityRepository = qualityUniversityRepository;
    }
    // 查出所有名校
    public List<QualityUniversity> findAll() {
        return qualityUniversityRepository.findAll();
    }
    // 根据名校名称查询
    public List<QualityUniversity> findByName(String name) {
        return qualityUniversityRepository.findByNameContainingIgnoreCase(name);
    }
}
